package org.testtools.assertion;

import java.io.File;
import java.io.IOException;

import org.testtools.handler.FileHandler;

public class FileAssertion {

	public synchronized static boolean fileIsEmpty(String filename)
			throws IOException {
    return FileHandler.getFileContent(filename, false).isEmpty();
  }

  public synchronized static boolean fileExists(String filename) {
    return new File(filename).exists();
  }

  public static boolean isPresent(String seq, String filename) throws IOException {
    return FileHandler.getFileContent(filename).contains(seq);
  }
}
